import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询课程列表
export function listCourse(query) {
  return request({
    url: '/course/page',
    method: 'get',
    params: query
  })
}
// 新增课程详细
export function addCourse(data) {
  return request({
    url: '/course/add',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}
// 修改课程状态
export function modify(id,status) {
  const data = { id,status }
  return request({
    url: '/course/modify',
    method: 'post',
    data: data
  })
}
// 删除课程详细
export function delCourse(id) {
  return request({
    url: '/course/' + id,
    method: 'delete'
  })
}
// 查询场馆下拉菜单
export function listvenue() {
  return request({
    url: '/course/venue',
    method: 'get',
  })
}
// 查询场馆下拉菜单
export function listcoach(query) {
  return request({
    url: '/course/coach',
    method: 'get',
    params: query
  })
}
  
// 查询课程下拉菜单
export function listfitness() {
  return request({
    url: '/plan/selectCourseType',
    method: 'get',
  })
}